<?php
header("content-type:text/html;charset=utf8");
$pdo = new PDO("mysql:host=127.0.0.1;charset=utf8;dbname=peng",'root','root');

$page = isset($_GET['page'])?$_GET['page']:1;
$size = 3;
$count = $pdo->query("select count(*) from user")->fetchall(PDO::FETCH_ASSOC);
print_r($count);die;


?>
<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<center>
		<table>
			<tr>
				<th>ID</th>
				<th>用户名</th>
				<th>密码</th>
				<th>手机号</th>
				<th>注册时间</th>

			</tr>
			<?php foreach ($data as $key => $value): ?>
				<tr>
					<td><?php echo $value['id'] ?></td>
					<td><?php echo $value['name'] ?></td>
					<td><?php echo $value['pwd'] ?></td>
					<td><?php echo $value['tel'] ?></td>
					<td><?php echo $value['add_date'] ?></td>

				</tr>
			<?php endforeach ?>
			
		</table>
		           
					
	</center>
</body>
</html>